package com.example.questionnaire.pojo.DO;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;


@Data
@ApiModel("知情同意书类")
public class Agreement {

    @TableId(type = IdType.UUID)
    @ApiModelProperty("id")
    private String id;

    @ApiModelProperty("问卷id")
    private String formid;

    @ApiModelProperty("标题")
    private String title;

    @ApiModelProperty("正文")
    private String content;

    @ApiModelProperty("显示频次")
    private int showNum;

    @ApiModelProperty("同意按钮文字")
    private String agree;

    @ApiModelProperty("不同意按钮文字")
    private String disagree;

    @ApiModelProperty("是否开启阅读时间")
    private int shortestReadingTimeEasy;

    @ApiModelProperty("是否隐藏不同意按钮")
    private int isDisagree;
    @ApiModelProperty("阅读的秒数")
    private int seconds;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)//在插入的时候自动填充
    private Date createTime;
    @ApiModelProperty("最后更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)////在插入和更新的时候自动填充
    private Date modifiedTime;
    @ApiModelProperty("逻辑删除")
    @TableLogic
    private Integer deleted;

    public Agreement(String formid, String title, String content, int showNum, String agree, String disagree, int shortestReadingTimeEasy,int isDisagree ,int seconds) {
        this.formid = formid;
        this.title = title;
        this.content = content;
        this.showNum = showNum;
        this.agree = agree;
        this.disagree = disagree;
        this.shortestReadingTimeEasy = shortestReadingTimeEasy;
        this.isDisagree = isDisagree;
        this.seconds = seconds;
    }


    public Agreement() {
    }
}
